<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
  <style>
    .del{
      cursor: pointer;
    }
  </style>
<title></title>
<link rel="stylesheet" href="__CSS__/pintuer.css">
<link rel="stylesheet" href="__CSS__/admin.css">
<script src="__JS__/jquery.js"></script>
<script src="__JS__/pintuer.js"></script>
<script src="__JS__/jquery.min.js"></script>
</head>
<body>
  <div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> 订单列表</strong> <a href="" style="float:right; display:none;">添加字段</a></div>
    <div class="padding border-bottom">
    	<form id="F" action="" method="get">
      <ul class="search" style="padding-left:10px;">
        <li>搜索：</li>
        <{volist name="arr" id="v"}>
        <label><input type="checkbox"  name="cid[]" value="<{$v['status_id']}>"
          <{in name="v['status_id']" value="$cid|default=[]"}>checked<{/in}> >
          <{$v['order_status']}>
        </label>
        <{/volist}>
        <li>
          价格区间
          <input type="number" name="order_amounts" value="<{$order_amounts|default=''}>">最小
          <input type="number" name="order_amountss" value="<{$order_amountss|default=''}>">最大
        </li>
        <li>
          <!--<input type="text" placeholder="请输入搜索关键字" name="buyer_name" value="<{$buyer_name|default=''}>" class="input" style="width:250px; line-height:17px;display:inline-block" />-->
          <input type="text" placeholder="请输入搜索订单号" name="order_sn" value="<{$order_sn|default=''}>" class="input" style="width:250px; line-height:17px;display:inline-block" />
          <a href="javascript:F.submit();" class="button border-main icon-search" > 搜索</a></li>
      </ul>
      </form>
    </div>
    <table class="table table-hover text-center">
      <tr>
        <th width="100" style="text-align:left; padding-left:20px;">ID</th>
        <th width="10%">用户</th>
        <th width="10%">订单号</th>
        <th width="10%">价格</th>
        <th width="15%">状态</th>
        <th width="20%">下单时间</th>
        <th width="20%">备注</th>
        <th width="310">操作</th>
      </tr>
      <{volist name="list" id="v" empty="$empty"}>
        <tr>
          <td style="text-align:left; padding-left:20px;"><input type="checkbox" class="chk xuan" name="id[]" value="<{$v['order_id']}>" />
           <{$v['order_id']}></td>
          <td><{$v['buyer_name']}></td>
          <td><{:str_replace(input('order_sn'),"<font color='red'><b>".input('order_sn')."</b></font>",$v['order_sn'])}></td>
          <td><{$v['order_amount']}></td>
          <td><{$v['order_status']}></td>
          <td><{$v['add_time']}></td>
          <td><{$v['postscript']}></td>
          <td><div class="button-group"> <a class="button border-main" href="order_detail.html"><span class="icon-edit"></span> 查看</a>
            <a class="button border-red" href="javascript:void(0)" onclick="del('<{$v[\'order_id\']}>')"><span class="icon-trash-o del" >删除</span> </a> </div></td>
        </tr>   		 
        <{/volist}>
      <tr>

        <td style="text-align:left; padding:19px 0;padding-left:20px;"><input type="checkbox" id="checkall"/>
          	全选 
        </td>
        <td colspan="7" style="text-align:left;padding-left:20px;">
        	<a id="delAll" href="javascript:void(0)" class="button border-red icon-trash-o" style="padding:5px 15px;" onclick="DelSelect()"> 删除</a>
        </td>
      </tr>
      <tr>
        <td colspan="8"><div class="pagelist"> <{$list|raw}></div></td>
      </tr>
    </table>

  </div>
<script type="text/javascript">

//搜索
function changesearch(){	
		
}

//单个删除
//单个删除
function del(id) {
    if (confirm("确定加入回收站吗？")){
        location.href="<{:url('del?1=1')}>&del="+id;
    }
}
//批量删除
function DelSelect() {
    var Checkbox=false;
    $("input[name='id[]']").each(function () {
        if (this.checked==true){
            Checkbox=true;
        }
    });
    if (Checkbox){
        var t=confirm("确定加入回收站吗？");
        if (t==false) return false;
        var arr = "";
        $('.xuan').each(function (index,object) {
            if ($(object).prop("checked")){
                arr+=$(object).val()+",";
            }
        });
        arr=arr.substring(0,arr.length-1);
        location.href='del.html?del='+arr;
    }else{
        alert("选择要删除的内容");
        return false;
    }
}

//全选
$("#checkall").click(function(){ 
  $("input[name='id[]']").each(function(){
	  if (this.checked) {
		  this.checked = false;
	  }
	  else {
		  this.checked = true;
	  }
  });
})

//批量删除


//批量排序
function sorts(){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {		
		Checkbox=true;	
	  }
	});
	if (Checkbox){	
		
		$("#listform").submit();		
	}
	else{
		alert("请选择要操作的内容!");
		return false;
	}
}


//批量首页显示
function changeishome(o){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {		
		Checkbox=true;	
	  }
	});
	if (Checkbox){
		
		$("#listform").submit();	
	}
	else{
		alert("请选择要操作的内容!");		
	
		return false;
	}
}

//批量推荐
function changeisvouch(o){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {		
		Checkbox=true;	
	  }
	});
	if (Checkbox){
		
		
		$("#listform").submit();	
	}
	else{
		alert("请选择要操作的内容!");	
		
		return false;
	}
}

//批量置顶
function changeistop(o){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {		
		Checkbox=true;	
	  }
	});
	if (Checkbox){		
		
		$("#listform").submit();	
	}
	else{
		alert("请选择要操作的内容!");		
	
		return false;
	}
}


//批量移动
function changecate(o){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {		
		Checkbox=true;	
	  }
	});
	if (Checkbox){		
		
		$("#listform").submit();		
	}
	else{
		alert("请选择要操作的内容!");
		
		return false;
	}
}

//批量复制
function changecopy(o){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {		
		Checkbox=true;	
	  }
	});
	if (Checkbox){	
		var i = 0;
	    $("input[name='id[]']").each(function(){
	  		if (this.checked==true) {
				i++;
			}		
	    });
		if(i>1){ 
	    	alert("只能选择一条信息!");
			$(o).find("option:first").prop("selected","selected");
		}else{
		
			$("#listform").submit();		
		}	
	}
	else{
		alert("请选择要复制的内容!");
		$(o).find("option:first").prop("selected","selected");
		return false;
	}
}

</script>
</body>
</html>